
export default class TweenData{
    constructor() {
        this.initPos = new Laya.Point;
        this.endPos = new Laya.Point;
        this.currentTime = 0;
        this.totalTime = 0;
        this.corner = false;
    }
    init(e, t, n, r, i, s) {
        this.initPos.x = e;
        this.initPos.y = t;
        this.endPos.x = n;
        this.endPos.y = r;
        this.totalTime = i;
        this.currentTime = 0;
        this.corner = s;
    }
    update(e, t) {
        this.currentTime += e;
        var n = false;
        if (this.currentTime >= this.totalTime) {
            this.currentTime = this.totalTime;
            n = true;
        }
        var r = this.currentTime / this.totalTime;
        if (!this.corner)
            r *= r * r;
        t.pos.x = this.initPos.x + (this.endPos.x - this.initPos.x) * r;
        t.pos.y = this.initPos.y + (this.endPos.y - this.initPos.y) * r;
        if (n)
            t.stopMove();
    }
}
